/*
 * Copyright (C) 2013 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.squareup.wire

import com.squareup.wire.protos.kotlin.alltypes.AllTypes
import okio.ByteString
import okio.ByteString.Companion.decodeHex

object TestAllTypesData {

  fun <T> list(x: T, numRepeated: Int = 2): List<T> = MutableList(numRepeated) { x }

  fun message(numRepeated: Int = 2): AllTypes {
    val bytes = ByteString.of(125.toByte(), 225.toByte())
    val nestedMessage = AllTypes.NestedMessage(a = 999)
    return AllTypes(
      opt_int32 = 111,
      opt_uint32 = 112,
      opt_sint32 = 113,
      opt_fixed32 = 114,
      opt_sfixed32 = 115,
      opt_int64 = 116L,
      opt_uint64 = 117L,
      opt_sint64 = 118L,
      opt_fixed64 = 119L,
      opt_sfixed64 = 120L,
      opt_bool = true,
      opt_float = 122.0f,
      opt_double = 123.0,
      opt_string = "124",
      opt_bytes = bytes,
      opt_nested_enum = AllTypes.NestedEnum.A,
      opt_nested_message = nestedMessage,
      req_int32 = 111,
      req_uint32 = 112,
      req_sint32 = 113,
      req_fixed32 = 114,
      req_sfixed32 = 115,
      req_int64 = 116L,
      req_uint64 = 117L,
      req_sint64 = 118L,
      req_fixed64 = 119L,
      req_sfixed64 = 120L,
      req_bool = true,
      req_float = 122.0f,
      req_double = 123.0,
      req_string = "124",
      req_bytes = bytes,
      req_nested_enum = AllTypes.NestedEnum.A,
      req_nested_message = nestedMessage,
      rep_int32 = list(111, numRepeated),
      rep_uint32 = list(112, numRepeated),
      rep_sint32 = list(113, numRepeated),
      rep_fixed32 = list(114, numRepeated),
      rep_sfixed32 = list(115, numRepeated),
      rep_int64 = list(116L, numRepeated),
      rep_uint64 = list(117L, numRepeated),
      rep_sint64 = list(118L, numRepeated),
      rep_fixed64 = list(119L, numRepeated),
      rep_sfixed64 = list(120L, numRepeated),
      rep_bool = list(true, numRepeated),
      rep_float = list(122.0f, numRepeated),
      rep_double = list(123.0, numRepeated),
      rep_string = list("124", numRepeated),
      rep_bytes = list(bytes, numRepeated),
      rep_nested_enum = list(AllTypes.NestedEnum.A, numRepeated),
      rep_nested_message = list(nestedMessage, numRepeated),
      pack_int32 = list(111, numRepeated),
      pack_uint32 = list(112, numRepeated),
      pack_sint32 = list(113, numRepeated),
      pack_fixed32 = list(114, numRepeated),
      pack_sfixed32 = list(115, numRepeated),
      pack_int64 = list(116L, numRepeated),
      pack_uint64 = list(117L, numRepeated),
      pack_sint64 = list(118L, numRepeated),
      pack_fixed64 = list(119L, numRepeated),
      pack_sfixed64 = list(120L, numRepeated),
      pack_bool = list(true, numRepeated),
      pack_float = list(122.0f, numRepeated),
      pack_double = list(123.0, numRepeated),
      pack_nested_enum = list(AllTypes.NestedEnum.A, numRepeated),
      ext_opt_bool = true,
      ext_rep_bool = list(true, numRepeated),
      ext_pack_bool = list(true, numRepeated),
      array_int32 = list(111, numRepeated).toIntArray(),
      array_uint32 = list(112, numRepeated).toIntArray(),
      array_sint32 = list(113, numRepeated).toIntArray(),
      array_fixed32 = list(114, numRepeated).toIntArray(),
      array_sfixed32 = list(115, numRepeated).toIntArray(),
      array_int64 = list(116L, numRepeated).toLongArray(),
      array_uint64 = list(117L, numRepeated).toLongArray(),
      array_sint64 = list(118L, numRepeated).toLongArray(),
      array_fixed64 = list(119L, numRepeated).toLongArray(),
      array_sfixed64 = list(120L, numRepeated).toLongArray(),
      array_float = list(122.0f, numRepeated).toFloatArray(),
      array_double = list(123.0, numRepeated).toDoubleArray(),
    )
  }

  val allTypes = message()

  const val expectedToString = (
    "" +
      "AllTypes{opt_int32=111, opt_uint32=112, opt_sint32=113, opt_fixed32=114, opt_sfixed32=115," +
      " opt_int64=116, opt_uint64=117, opt_sint64=118, opt_fixed64=119, opt_sfixed64=120, opt_boo" +
      "l=true, opt_float=122.0, opt_double=123.0, opt_string=124, opt_bytes=[hex=7de1], opt_neste" +
      "d_enum=A, opt_nested_message=NestedMessage{a=999}, req_int32=111, req_uint32=112, req_sint" +
      "32=113, req_fixed32=114, req_sfixed32=115, req_int64=116, req_uint64=117, req_sint64=118, " +
      "req_fixed64=119, req_sfixed64=120, req_bool=true, req_float=122.0, req_double=123.0, req_s" +
      "tring=124, req_bytes=[hex=7de1], req_nested_enum=A, req_nested_message=NestedMessage{a=999" +
      "}, rep_int32=[111, 111], rep_uint32=[112, 112], rep_sint32=[113, 113], rep_fixed32=[114, 1" +
      "14], rep_sfixed32=[115, 115], rep_int64=[116, 116], rep_uint64=[117, 117], rep_sint64=[118" +
      ", 118], rep_fixed64=[119, 119], rep_sfixed64=[120, 120], rep_bool=[true, true], rep_float=" +
      "[122.0, 122.0], rep_double=[123.0, 123.0], rep_string=[124, 124], rep_bytes=[[hex=7de1], [" +
      "hex=7de1]], rep_nested_enum=[A, A], rep_nested_message=[NestedMessage{a=999}, NestedMessag" +
      "e{a=999}], pack_int32=[111, 111], pack_uint32=[112, 112], pack_sint32=[113, 113], pack_fix" +
      "ed32=[114, 114], pack_sfixed32=[115, 115], pack_int64=[116, 116], pack_uint64=[117, 117], " +
      "pack_sint64=[118, 118], pack_fixed64=[119, 119], pack_sfixed64=[120, 120], pack_bool=[true" +
      ", true], pack_float=[122.0, 122.0], pack_double=[123.0, 123.0], pack_nested_enum=[A, A], a" +
      "rray_int32=[111, 111], array_uint32=[112, 112], array_sint32=[113, 113], array_fixed32=[11" +
      "4, 114], array_sfixed32=[115, 115], array_int64=[116, 116], array_uint64=[117, 117], array" +
      "_sint64=[118, 118], array_fixed64=[119, 119], array_sfixed64=[120, 120], array_float=[122." +
      "0, 122.0], array_double=[123.0, 123.0], ext_opt_bool=true, ext_rep_bool=[true, true], ext_" +
      "pack_bool=[true, true]}"
    )
  val expectedOutput = (
    "" +
      // optional

      "08" + // tag = 1, type = 0
      "6f" + // value = 111
      "10" + // tag = 2, type = 0
      "70" + // value = 112
      "18" + // tag = 3, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "25" + // tag = 4, type = 5
      "72000000" + // value = 114 (fixed32)
      "2d" + // tag = 5, type = 5
      "73000000" + // value = 115 (sfixed32)
      "30" + // tag = 6, type = 0
      "74" + // value = 116
      "38" + // tag = 7, type = 0
      "75" + // value = 117
      "40" + // tag = 8, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "49" + // tag = 9, type = 1
      "7700000000000000" + // value = 119
      "51" + // tag = 10, type = 1
      "7800000000000000" + // value = 120
      "58" + // tag = 11, type = 0
      "01" + // value = 1 (true)
      "65" + // tag = 12, type = 5
      "0000f442" + // value = 122.0F
      "69" + // tag = 13, type = 1
      "0000000000c05e40" + // value = 123.0
      "72" + // tag = 14, type = 2
      "03" + // length = 3
      "313234" +
      "7a" + // tag = 15, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "8001" + // tag = 16, type = 0
      "01" + // value = 1
      "8a01" + // tag = 17, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // required

      "a806" + // tag = 101, type = 0
      "6f" + // value = 111
      "b006" + // tag = 102, type = 0
      "70" + // value = 112
      "b806" + // tag = 103, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "c506" + // tag = 104, type = 5
      "72000000" + // value = 114 (fixed32)
      "cd06" + // tag = 105, type = 5
      "73000000" + // value = 115 (sfixed32)
      "d006" + // tag = 106, type = 0
      "74" + // value = 116
      "d806" + // tag = 107, type = 0
      "75" + // value = 117
      "e006" + // tag = 108, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "e906" + // tag = 109, type = 1
      "7700000000000000" + // value = 119
      "f106" + // tag = 110, type = 1
      "7800000000000000" + // value = 120
      "f806" + // tag = 111, type = 0
      "01" + // value = 1 (true)
      "8507" + // tag = 112, type = 5
      "0000f442" + // value = 122.0F
      "8907" + // tag = 113, type = 1
      "0000000000c05e40" + // value = 123.0
      "9207" + // tag = 114, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "9a07" + // tag = 115, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "a007" + // tag = 116, type = 0
      "01" + // value = 1
      "aa07" + // tag = 117, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // repeated

      "c80c" + // tag = 201, type = 0
      "6f" + // value = 111
      "c80c" + // tag = 201, type = 0
      "6f" + // value = 111
      "d00c" + // tag = 202, type = 0
      "70" + // value = 112
      "d00c" + // tag = 202, type = 0
      "70" + // value = 112
      "d80c" + // tag = 203, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "d80c" + // tag = 203, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "e50c" + // tag = 204, type = 5
      "72000000" + // value = 114 (fixed32)
      "e50c" + // tag = 204, type = 5
      "72000000" + // value = 114 (fixed32)
      "ed0c" + // tag = 205, type = 5
      "73000000" + // value = 115 (sfixed32)
      "ed0c" + // tag = 205, type = 5
      "73000000" + // value = 115 (sfixed32)
      "f00c" + // tag = 206, type = 0
      "74" + // value = 116
      "f00c" + // tag = 206, type = 0
      "74" + // value = 116
      "f80c" + // tag = 207, type = 0
      "75" + // value = 117
      "f80c" + // tag = 207, type = 0
      "75" + // value = 117
      "800d" + // tag = 208, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "800d" + // tag = 208, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "890d" + // tag = 209, type = 1
      "7700000000000000" + // value = 119
      "890d" + // tag = 209, type = 1
      "7700000000000000" + // value = 119
      "910d" + // tag = 210, type = 1
      "7800000000000000" + // value = 120
      "910d" + // tag = 210, type = 1
      "7800000000000000" + // value = 120
      "980d" + // tag = 211, type = 0
      "01" + // value = 1 (true)
      "980d" + // tag = 211, type = 0
      "01" + // value = 1 (true)
      "a50d" + // tag = 212, type = 5
      "0000f442" + // value = 122.0F
      "a50d" + // tag = 212, type = 5
      "0000f442" + // value = 122.0F
      "a90d" + // tag = 213, type = 1
      "0000000000c05e40" + // value = 123.0
      "a90d" + // tag = 213, type = 1
      "0000000000c05e40" + // value = 123.0
      "b20d" + // tag = 214, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "b20d" + // tag = 214, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "ba0d" + // tag = 215, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "ba0d" + // tag = 215, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "c00d" + // tag = 216, type = 0
      "01" + // value = 1
      "c00d" + // tag = 216, type = 0
      "01" + // value = 1
      "ca0d" + // tag = 217, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999
      "ca0d" + // tag = 217, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // packed

      "ea12" + // tag = 301, type = 2
      "02" + // length = 2
      "6f" + // value = 111
      "6f" + // value = 111
      "f212" + // tag = 302, type = 2
      "02" + // length = 2
      "70" + // value = 112
      "70" + // value = 112
      "fa12" + // tag = 303, type = 2
      "04" + // length = 4
      "e201" + // value = 226 (=113 zig-zag)
      "e201" + // value = 226 (=113 zig-zag)
      "8213" + // tag = 304, type = 2
      "08" + // length = 8
      "72000000" + // value = 114 (fixed32)
      "72000000" + // value = 114 (fixed32)
      "8a13" + // tag = 305, type = 2
      "08" + // length = 8
      "73000000" + // value = 115 (sfixed32)
      "73000000" + // value = 115 (sfixed32)
      "9213" + // tag = 306, type = 2
      "02" + // length = 2
      "74" + // value = 116
      "74" + // value = 116
      "9a13" + // tag = 307, type = 2
      "02" + // length = 2
      "75" + // value = 117
      "75" + // value = 117
      "a213" + // tag = 308, type = 2
      "04" + // length = 4
      "ec01" + // value = 236 (=118 zigzag)
      "ec01" + // value = 236 (=118 zigzag)
      "aa13" + // tag = 309, type = 2
      "10" + // length = 16
      "7700000000000000" + // value = 119
      "7700000000000000" + // value = 119
      "b213" + // tag = 310, type = 2
      "10" + // length = 16
      "7800000000000000" + // value = 120
      "7800000000000000" + // value = 120
      "ba13" + // tag = 311, type = 2
      "02" + // length = 2
      "01" + // value = 1 (true)
      "01" + // value = 1 (true)
      "c213" + // tag = 312, type = 2
      "08" + // length = 8
      "0000f442" + // value = 122.0F
      "0000f442" + // value = 122.0F
      "ca13" + // tag = 313, type = 2
      "10" + // length = 16
      "0000000000c05e40" + // value = 123.0
      "0000000000c05e40" + // value = 123.0
      "e213" + // tag = 316, type = 2
      "02" + // length = 2
      "01" + // value = 1
      "01" + // value = 1

      // arrays
      "ca25" + // tag = 601, type = 2
      "02" + // length = 2
      "6f" + // value = 111
      "6f" + // value = 111
      "d225" + // tag = 602, type = 2
      "02" + // length = 2
      "70" + // value = 112
      "70" + // value = 112
      "da25" + // tag = 603, type = 2
      "04" + // length = 4
      "e201" + // value = 226 (=113 zig-zag)
      "e201" + // value = 226 (=113 zig-zag)
      "e225" + // tag = 604, type = 2
      "08" + // length = 8
      "72000000" + // value = 114 (fixed32)
      "72000000" + // value = 114 (fixed32)
      "ea25" + // tag = 605, type = 2
      "08" + // length = 8
      "73000000" + // value = 115 (sfixed32)
      "73000000" + // value = 115 (sfixed32)
      "f225" + // tag = 606, type = 2
      "02" + // length = 2
      "74" + // value = 116
      "74" + // value = 116
      "fa25" + // tag = 607, type = 2
      "02" + // length = 2
      "75" + // value = 117
      "75" + // value = 117
      "8226" + // tag = 608, type = 2
      "04" + // length = 4
      "ec01" + // value = 236 (=118 zigzag)
      "ec01" + // value = 236 (=118 zigzag)
      "8a26" + // tag = 609, type = 2
      "10" + // length = 16
      "7700000000000000" + // value = 119
      "7700000000000000" + // value = 119
      "9226" + // tag = 610, type = 2
      "10" + // length = 16
      "7800000000000000" + // value = 120
      "7800000000000000" + // value = 120
      "9a26" + // tag = 611, type = 2
      "08" + // length = 8
      "0000f442" + // value = 122.0F
      "0000f442" + // value = 122.0F
      "a226" + // tag = 612, type = 2
      "10" + // length = 16
      "0000000000c05e40" + // value = 123.0
      "0000000000c05e40" + // value = 123.0

      // extensions

      "983f" + // tag = 1011, type = 0
      "01" + // value = 1 (true)
      "b845" + // tag = 1111, type = 0
      "01" + // value = 1 (true)
      "b845" + // tag = 1111, type = 0
      "01" + // value = 1 (true)
      "da4b" + // tag = 1211, type = 2
      "02" + // length = 2
      "01" + // value = 1 (true)
      "01" // value = 1 (true)
    ).decodeHex()

  // message with 'packed' fields stored non-packed, must still be readable
  val nonPacked = (
    "" +
      // optional

      "08" + // tag = 1, type = 0
      "6f" + // value = 111
      "10" + // tag = 2, type = 0
      "70" + // value = 112
      "18" + // tag = 3, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "25" + // tag = 4, type = 5
      "72000000" + // value = 114 (fixed32)
      "2d" + // tag = 5, type = 5
      "73000000" + // value = 115 (sfixed32)
      "30" + // tag = 6, type = 0
      "74" + // value = 116
      "38" + // tag = 7, type = 0
      "75" + // value = 117
      "40" + // tag = 8, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "49" + // tag = 9, type = 1
      "7700000000000000" + // value = 119
      "51" + // tag = 10, type = 1
      "7800000000000000" + // value = 120
      "58" + // tag = 11, type = 0
      "01" + // value = 1 (true)
      "65" + // tag = 12, type = 5
      "0000f442" + // value = 122.0F
      "69" + // tag = 13, type = 1
      "0000000000c05e40" + // value = 123.0
      "72" + // tag = 14, type = 2
      "03" + // length = 3
      "313234" +
      "7a" + // tag = 15, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "8001" + // tag = 16, type = 0
      "01" + // value = 1
      "8a01" + // tag = 17, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // required

      "a806" + // tag = 101, type = 0
      "6f" + // value = 111
      "b006" + // tag = 102, type = 0
      "70" + // value = 112
      "b806" + // tag = 103, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "c506" + // tag = 104, type = 5
      "72000000" + // value = 114 (fixed32)
      "cd06" + // tag = 105, type = 5
      "73000000" + // value = 115 (sfixed32)
      "d006" + // tag = 106, type = 0
      "74" + // value = 116
      "d806" + // tag = 107, type = 0
      "75" + // value = 117
      "e006" + // tag = 108, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "e906" + // tag = 109, type = 1
      "7700000000000000" + // value = 119
      "f106" + // tag = 110, type = 1
      "7800000000000000" + // value = 120
      "f806" + // tag = 111, type = 0
      "01" + // value = 1 (true)
      "8507" + // tag = 112, type = 5
      "0000f442" + // value = 122.0F
      "8907" + // tag = 113, type = 1
      "0000000000c05e40" + // value = 123.0
      "9207" + // tag = 114, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "9a07" + // tag = 115, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "a007" + // tag = 116, type = 0
      "01" + // value = 1
      "aa07" + // tag = 117, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // repeated

      "c80c" + // tag = 201, type = 0
      "6f" + // value = 111
      "c80c" + // tag = 201, type = 0
      "6f" + // value = 111
      "d00c" + // tag = 202, type = 0
      "70" + // value = 112
      "d00c" + // tag = 202, type = 0
      "70" + // value = 112
      "d80c" + // tag = 203, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "d80c" + // tag = 203, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "e50c" + // tag = 204, type = 5
      "72000000" + // value = 114 (fixed32)
      "e50c" + // tag = 204, type = 5
      "72000000" + // value = 114 (fixed32)
      "ed0c" + // tag = 205, type = 5
      "73000000" + // value = 115 (sfixed32)
      "ed0c" + // tag = 205, type = 5
      "73000000" + // value = 115 (sfixed32)
      "f00c" + // tag = 206, type = 0
      "74" + // value = 116
      "f00c" + // tag = 206, type = 0
      "74" + // value = 116
      "f80c" + // tag = 207, type = 0
      "75" + // value = 117
      "f80c" + // tag = 207, type = 0
      "75" + // value = 117
      "800d" + // tag = 208, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "800d" + // tag = 208, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "890d" + // tag = 209, type = 1
      "7700000000000000" + // value = 119
      "890d" + // tag = 209, type = 1
      "7700000000000000" + // value = 119
      "910d" + // tag = 210, type = 1
      "7800000000000000" + // value = 120
      "910d" + // tag = 210, type = 1
      "7800000000000000" + // value = 120
      "980d" + // tag = 211, type = 0
      "01" + // value = 1 (true)
      "980d" + // tag = 211, type = 0
      "01" + // value = 1 (true)
      "a50d" + // tag = 212, type = 5
      "0000f442" + // value = 122.0F
      "a50d" + // tag = 212, type = 5
      "0000f442" + // value = 122.0F
      "a90d" + // tag = 213, type = 1
      "0000000000c05e40" + // value = 123.0
      "a90d" + // tag = 213, type = 1
      "0000000000c05e40" + // value = 123.0
      "b20d" + // tag = 214, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "b20d" + // tag = 214, type = 2
      "03" + // length = 3
      "313234" + // value = "124"
      "ba0d" + // tag = 215, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "ba0d" + // tag = 215, type = 2
      "02" + // length = 2
      "7de1" + // value = { 125, 225 }
      "c00d" + // tag = 216, type = 0
      "01" + // value = 1
      "c00d" + // tag = 216, type = 0
      "01" + // value = 1
      "ca0d" + // tag = 217, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999
      "ca0d" + // tag = 217, type = 2
      "03" + // length = 3
      "08" + // nested tag = 1, type = 0
      "e707" + // value = 999

      // packed

      "e812" + // tag = 301, type = 0
      "6f" + // value = 111
      "e812" + // tag = 301, type = 0
      "6f" + // value = 111
      "f012" + // tag = 302, type = 0
      "70" + // value = 112
      "f012" + // tag = 302, type = 0
      "70" + // value = 112
      "f812" + // tag = 303, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "f812" + // tag = 303, type = -
      "e201" + // value = 226 (=113 zig-zag)
      "8513" + // tag = 304, type = 5
      "72000000" + // value = 114 (fixed32)
      "8513" + // tag = 304, type = 5
      "72000000" + // value = 114 (fixed32)
      "8d13" + // tag = 305, type = 5
      "73000000" + // value = 115 (sfixed32)
      "8d13" + // tag = 305, type = 5
      "73000000" + // value = 115 (sfixed32)
      "9013" + // tag = 306, type = 0
      "74" + // value = 116
      "9013" + // tag = 306, type = 0
      "74" + // value = 116
      "9813" + // tag = 307, type = 0
      "75" + // value = 117
      "9813" + // tag = 307, type = 0
      "75" + // value = 117
      "a013" + // tag = 308, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "a013" + // tag = 308, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "a913" + // tag = 309, type = 0
      "7700000000000000" + // value = 119
      "a913" + // tag = 309, type = 0
      "7700000000000000" + // value = 119
      "b113" + // tag = 310, type = 0
      "7800000000000000" + // value = 120
      "b113" + // tag = 310, type = 0
      "7800000000000000" + // value = 120
      "b813" + // tag = 311, type = 0
      "01" + // value = 1 (true)
      "b813" + // tag = 311, type = 0
      "01" + // value = 1 (true)
      "c513" + // tag = 312, type = 5
      "0000f442" + // value = 122.0F
      "c513" + // tag = 312, type = 5
      "0000f442" + // value = 122.0F
      "c913" + // tag = 313, type = 0
      "0000000000c05e40" + // value = 123.0
      "c913" + // tag = 313, type = 0
      "0000000000c05e40" + // value = 123.0
      "e013" + // tag = 316, type = 0
      "01" + // value = 1
      "e013" + // tag = 316, type = 0
      "01" + // value = 1

      // arrays

      "c825" + // tag = 601, type = 0
      "6f" + // value = 111
      "c825" + // tag = 601, type = 0
      "6f" + // value = 111
      "d025" + // tag = 602, type = 0
      "70" + // value = 112
      "d025" + // tag = 602, type = 0
      "70" + // value = 112
      "d825" + // tag = 603, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "d825" + // tag = 603, type = 0
      "e201" + // value = 226 (=113 zig-zag)
      "e525" + // tag = 604, type = 5
      "72000000" + // value = 114 (fixed32)
      "e525" + // tag = 604, type = 5
      "72000000" + // value = 114 (fixed32)
      "ed25" + // tag = 605, type = 5
      "73000000" + // value = 115 (sfixed32)
      "ed25" + // tag = 605, type = 5
      "73000000" + // value = 115 (sfixed32)
      "f025" + // tag = 606, type = 0
      "74" + // value = 116
      "f025" + // tag = 606, type = 0
      "74" + // value = 116
      "f825" + // tag = 607, type = 0
      "75" + // value = 117
      "f825" + // tag = 607, type = 0
      "75" + // value = 117
      "8026" + // tag = 608, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "8026" + // tag = 608, type = 0
      "ec01" + // value = 236 (=118 zigzag)
      "8926" + // tag = 609, type = 1
      "7700000000000000" + // value = 119
      "8926" + // tag = 609, type = 1
      "7700000000000000" + // value = 119
      "9126" + // tag = 610, type = 1
      "7800000000000000" + // value = 120
      "9126" + // tag = 610, type = 1
      "7800000000000000" + // value = 120
      "9d26" + // tag = 611, type = 5
      "0000f442" + // value = 122.0F
      "9d26" + // tag = 611, type = 5
      "0000f442" + // value = 122.0F
      "a126" + // tag = 612, type = 1
      "0000000000c05e40" + // value = 123.0
      "a126" + // tag = 612, type = 1
      "0000000000c05e40" + // value = 123.0

      // extension

      "983f" + // tag = 1011, type = 0
      "01" + // value = 1 (true)
      "b845" + // tag = 1111, type = 0
      "01" + // value = 1 (true)
      "b845" + // tag = 1111, type = 0
      "01" + // value = 1 (true)
      "d84b" + // tag = 1211, type = 0
      "01" + // value = 1 (true)
      "d84b" + // tag = 1211, type = 0
      "01" // value = 1 (true)
    ).decodeHex()
}
